package com.suanfa8.wx.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/weixin")
@RestController
@Slf4j
public class WeixinController {

    @GetMapping("/access")
    public String access(String signature, String timestamp, String nonce, String echostr) {
        log.info("get 请求");
        log.info("signature => {}", signature);
        log.info("timestamp => {}", timestamp);
        log.info("nonce => {}", nonce);
        log.info("echostr => {}", echostr);
        return "ok";
    }

    @PostMapping("/weixin")
    public String weixin(){
        log.info("post 请求");
        return "";
    }

}
